﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmReporteComprobanteVenta.aspx.cs" Inherits="UI.Tesoreria.frmReporteComprobanteVenta" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script language="javascript" type="text/javascript">
    function AbrirVentana(url) {
        window.open(url, '_blank');
    }
    </script>
<style type="text/css">
        .style2
        {
            /*background: url(Administration/Images/Grey/captionbckg.gif) repeat-x;*/
        background: #f9f9f9 url('../Imagenes/grey/captionbckg.gif') repeat-x;
            color: #333333;
            text-align: left;
            line-height: 16px;
            font-size: 11px;
            font-weight: bold;
            padding-top: 4px;
            padding-left: 4px;
            font-family: tahoma,arial,verdana,sans-serif;
            height: 23px;
        }
        .style3
        {
            height: 23px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div style="position: absolute; z-index:0; top: 285px; left: 340px; width: 45px; height: 45px"><asp:ImageButton ID="btnExportar" runat="server" Height="41px"  ImageUrl="~/Imagenes/Botones/EXCEL.png" ToolTip="Exportar a Excel" Width="35px" 
onclick="btnExportar_Click1"/></div>

<asp:UpdatePanel ID="panel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="chkTodosEstados" />
<asp:PostBackTrigger ControlID="chkActivos" />
<asp:PostBackTrigger ControlID="chkAnulados" />

</Triggers>
    <ContentTemplate>
    <table class="BTabla" style="width: 100%">
        <tr>
            <td colspan="5">
                <h2>Reporte Comprobante de Venta</h2>
            </td>
        </tr>
        <tr>
            <td class="filaTabla" colspan="6">
                Datos Obligatorios</td>
        </tr>
        <tr>
            <td><asp:Label ID="Label1" runat="server" Text="Conceptos :" Width="80px"></asp:Label></td>
            <td><asp:DropDownList ID="ddlConceptos" runat="server" style="margin-left: 0px" Width="300px">
                    <asp:ListItem Value="00">--Todos--</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td align="right"><asp:Label ID="Label3" runat="server" Text="Tipo de Documento :" Width="130px"></asp:Label></td>
            <td><asp:DropDownList runat="server" Height="18px" Width="222px" ID="ComboTipoDocumento">
              <asp:ListItem Value="00">--Todos--</asp:ListItem>
               </asp:DropDownList>                            
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td><asp:Label ID="Label2" runat="server" Text="Persona :"></asp:Label></td>
            <td><asp:TextBox ID="txtNombreCliente" runat="server" Width="300px"></asp:TextBox></td>
            <td align="right">
                <asp:CheckBox ID="chkTodosEstados" runat="server" Text="Todos:" 
                    AutoPostBack="True" oncheckedchanged="chkTodosEstados_CheckedChanged" /></td>
            <td> 
                <asp:CheckBox ID="chkActivos" runat="server" Text="Activos" 
                    AutoPostBack="True" oncheckedchanged="chkActivos_CheckedChanged" 
                    Checked="True"/>
                    <asp:CheckBox ID="chkAnulados" runat="server" Text="Anulados" 
                    AutoPostBack="True" oncheckedchanged="chkAnulados_CheckedChanged"  />                                                    
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>Fecha Inicio:</td>
            <td>
                <asp:TextBox ID="txtFechaApertura" runat="server" Width="100px"></asp:TextBox>
                <asp:CalendarExtender ID="txtFechaApertura_CalendarExtender" runat="server" 
                    Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtFechaApertura">
                </asp:CalendarExtender>
            </td>
            <td align="right">Fecha Fin :</td>
            <td>
             <asp:TextBox ID="txtFechaCierre" runat="server" Width="100px"></asp:TextBox>
                            <asp:CalendarExtender ID="txtFechaCierre_CalendarExtender" runat="server" Enabled="True"
                                Format="dd/MM/yyyy" TargetControlID="txtFechaCierre">
                            </asp:CalendarExtender>
            </td>
            <td>
            <asp:Button ID="btnBuscar" runat="server" Height="31px" Text="Buscar" Width="87px" onclick="btnBuscar_Click" />
            </td>
            <td><asp:Button ID="btnGenerar" runat="server" Height="34px" 
                    href="frmReporteActaPromocionalPdf2.aspx" target="_blank" Text="Reporte" 
                    Width="87px" onclick="btnGenerar_Click" /></td>
        </tr>

    </table>   
    <br />
     
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
     <asp:Label ID="LabelError" runat="server" ForeColor="Red"></asp:Label>   
    
    <table>
    <tr>
        <td colspan="4" align="right">
        <asp:GridView ID="grvReporteComprobanteVenta" runat="server" HorizontalAlign="Center" Width="867px" AllowPaging="True" AutoGenerateColumns="False" PageSize="15" 
            CaptionAlign="Top" AllowSorting="True" onpageindexchanging="grvReporteComprobanteVenta_PageIndexChanging" >
                <Columns>
                    <asp:BoundField DataField="TipoDocumento" HeaderText="TipoDocumento" />
                    <asp:BoundField DataField="Numeracion" HeaderText="Numeracion" />
                    <asp:BoundField DataField="FechaCreacion" HeaderText="FechaCreacion" />
                    <asp:BoundField DataField="NombreCliente" HeaderText="NombreCliente" />
                    <asp:BoundField DataField="Concepto" HeaderText="Concepto" />
                    <asp:BoundField DataField="Estado" HeaderText="Estado" />
                    <asp:BoundField DataField="Total" HeaderText="Total" />                    
                   <%-- <asp:CommandField HeaderText="Revisar" SelectText="Revisar" 
                        ShowSelectButton="True" />--%>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
     <td colspan="2"></td>
     <td align="right"><asp:Label ID="lblMontoTexto" runat="server" Text="MONTO TOTAL: S./" 
             Width="480px" style="font-weight: 700"></asp:Label></td>
     <td align="right"><asp:Label ID="lblMontoTotal" runat="server" Height="20px" 
             Width="50px" style="font-weight: 700"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>
    </table>
    
     <asp:Label ID="LabelErrorListado" runat="server" Font-Bold="True" 
            ForeColor="Red"></asp:Label>

            
                
    </ContentTemplate>
    </asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="panel1" DisplayAfter="0">
    <ProgressTemplate>
        <div style="background-color: Gray; filter:alpha(opacity=60); opacity:0.60; width: 100%; top: 0px; left: 0px; position: fixed; height: 100%;">
        </div>
          <div style="margin:auto;
              font-family:Trebuchet MS;
              filter: alpha(opacity=100);
              opacity: 1;
              font-size:small;
              vertical-align: middle;
              top: 45%;
              position: fixed;
              right: 45%;
              color: #275721;
              text-align: center;
              background-color: White;
              height: 100px; bottom: 296px;">
                <table style=" background-color: White; font-family: Sans-Serif; text-align: center; border: solid 1px #275721; color: #275721; width: inherit; height: inherit; padding: 15px;">
                <tr>
                <td style=" text-align: inherit;"><img src="../Imagenes/Gif/cargando.gif" alt="Loading"  /></td>
                <td style=" text-align: inherit;"><span style="font-family: Sans-Serif; font-size: medium; font-weight: bold; font">Cargando...</span></td>
                </tr>
                </table>
        </div>
    </ProgressTemplate>
    </asp:UpdateProgress>

</asp:Content>
